3.1453 \(\int \frac{1}{(-2+x) \sqrt{2+x}} \, dx\)

Optimal. Leaf size=14 \[ -\tanh ^{-1}\left (\frac{\sqrt{x+2}}{2}\right ) \]

[Out]

-ArcTanh[Sqrt[2 + x]/2]

________________________________________________________________________________________

Rubi [A]  time = 0.0038494, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154, Rules used = {63, 207} \[ -\tanh ^{-1}\left (\frac{\sqrt{x+2}}{2}\right ) \]

Antiderivative was successfully verified.

[In]

Int[1/((-2 + x)*Sqrt[2 + x]),x]

[Out]

-ArcTanh[Sqrt[2 + x]/2]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{1}{(-2+x) \sqrt{2+x}} \, dx &=2 \operatorname{Subst}\left (\int \frac{1}{-4+x^2} \, dx,x,\sqrt{2+x}\right )\\ &=-\tanh ^{-1}\left (\frac{\sqrt{2+x}}{2}\right )\\ \end{align*}

Mathematica [A]  time = 0.0025444, size = 14, normalized size = 1. \[ -\tanh ^{-1}\left (\frac{\sqrt{x+2}}{2}\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[1/((-2 + x)*Sqrt[2 + x]),x]

[Out]

-ArcTanh[Sqrt[2 + x]/2]

________________________________________________________________________________________

Maple [B]  time = 0.006, size = 22, normalized size = 1.6 \begin{align*} -{\frac{1}{2}\ln \left ( \sqrt{2+x}+2 \right ) }+{\frac{1}{2}\ln \left ( \sqrt{2+x}-2 \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(-2+x)/(2+x)^(1/2),x)

[Out]

-1/2*ln((2+x)^(1/2)+2)+1/2*ln((2+x)^(1/2)-2)

________________________________________________________________________________________

Maxima [A]  time = 0.941409, size = 28, normalized size = 2. \begin{align*} -\frac{1}{2} \, \log \left (\sqrt{x + 2} + 2\right ) + \frac{1}{2} \, \log \left (\sqrt{x + 2} - 2\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-2+x)/(2+x)^(1/2),x, algorithm="maxima")

[Out]

-1/2*log(sqrt(x + 2) + 2) + 1/2*log(sqrt(x + 2) - 2)

________________________________________________________________________________________

Fricas [A]  time = 2.02281, size = 73, normalized size = 5.21 \begin{align*} -\frac{1}{2} \, \log \left (\sqrt{x + 2} + 2\right ) + \frac{1}{2} \, \log \left (\sqrt{x + 2} - 2\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-2+x)/(2+x)^(1/2),x, algorithm="fricas")

[Out]

-1/2*log(sqrt(x + 2) + 2) + 1/2*log(sqrt(x + 2) - 2)

________________________________________________________________________________________

Sympy [A]  time = 0.494461, size = 27, normalized size = 1.93 \begin{align*} \begin{cases} - \operatorname{acoth}{\left (\frac{\sqrt{x + 2}}{2} \right )} & \text{for}\: \frac{\left |{x + 2}\right |}{4} > 1 \\- \operatorname{atanh}{\left (\frac{\sqrt{x + 2}}{2} \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-2+x)/(2+x)**(1/2),x)

[Out]

Piecewise((-acoth(sqrt(x + 2)/2), Abs(x + 2)/4 > 1), (-atanh(sqrt(x + 2)/2), True))

________________________________________________________________________________________

Giac [B]  time = 1.04679, size = 30, normalized size = 2.14 \begin{align*} -\frac{1}{2} \, \log \left (\sqrt{x + 2} + 2\right ) + \frac{1}{2} \, \log \left ({\left | \sqrt{x + 2} - 2 \right |}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(-2+x)/(2+x)^(1/2),x, algorithm="giac")

[Out]

-1/2*log(sqrt(x + 2) + 2) + 1/2*log(abs(sqrt(x + 2) - 2))